﻿using System;

namespace WriteAzureBlob
{
    class Program
    {
        static void Main(string[] args)
        {
            if (args.Length == 0)
                Environment.Exit(0);

            BlobOpgalleryClient client = null;

            try
            {
                AddBlobRequestType addBlobRequest = new AddBlobRequestType();
                addBlobRequest.StorageContent = new StorageContentType();
                addBlobRequest.StorageContent.Item = args[0];

                client = new BlobOpgalleryClient();
                client.AddBlob(addBlobRequest);
            }
            finally
            {
                if (client != null)
                    client.Close();
            }
        }
    }
}
